package com.semanticweb.webapp.dao.rbac;

import org.hibernate.criterion.Restrictions;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import com.semanticweb.webapp.model.rbac.Object;

/**
 * {@link ObjectDAO} implementation.
 * 
 * @author Vedran Cuca 19/2011
 * 
 */
@Repository
@Transactional
public class ObjectDAOHibernate extends AbstractGenericHibernateDao<Object> implements ObjectDAO {

    @Override
    public Object findByName(final String name) {
        return findByCriteriaUnique(Restrictions.eq(Object.NAME, name));
    }

}
